import request from '@/utils/request'

// 查询订单信息列表
export function listTrade(query) {
  return request({
    url: '/trade/list',
    method: 'get',
    params: query
  })
}

// 查询订单信息详细
export function getTrade(tradeNo) {
  return request({
    url: '/trade/' + tradeNo,
    method: 'get'
  })
}

// 新增订单信息
export function addTrade(data) {
  return request({
    url: '/trade',
    method: 'post',
    data: data
  })
}

// 修改订单信息
export function updateTrade(data) {
  return request({
    url: '/trade',
    method: 'put',
    data: data
  })
}

// 删除订单信息
export function delTrade(tradeNo) {
  return request({
    url: '/trade/' + tradeNo,
    method: 'delete'
  })
}
// 补单
export function supplement(tradeNos, pwd) {
  return request({
    url: '/trade/supplement/'+tradeNos+'/'+pwd,
    method: 'post',
  })
}
// 补单
export function manualNotice(tradeNos) {
  return request({
    url: 'trade/manualNotice/'+tradeNos,
    method: 'post',
  })
}
